package com.water.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author wsj
 * @version 1.0
 * @description: TODO
 * @date 2022/1/19 0:01
 */
public class Team {
    private Integer id;
    private String name;
    private String location;
    @DateTimeFormat(pattern = "yyyy-MM-dd") //接收参数时，时间格式化
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") //结果返回json格式时，时间格式化
    private Date createTime;

    public Date getCreateTime() {
        return createTime;
    }

    public Team(Integer id, String name, String location, Date createTime) {
        this.id = id;
        this.name = name;
        this.location = location;
        this.createTime = createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Team{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", location='" + location + '\'' +
                ", createTime=" + createTime +
                '}';
    }

    public Team(Integer id, String name, String location) {
        this.id = id;
        this.name = name;
        this.location = location;
    }

    public Team() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }
}
